import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import home from '@/components/home'
import main from '@/components/main'
import workStation from '@/components/station/workStation'
import baseHouse from '@/components/station/baseHouse'
import baseEnSwitchRoom from '@/components/station/baseEnSwitchRoom'
import baseEnDistBox from '@/components/station/baseEnDistBox'
import baseEnBuilding from '@/components/device/baseEnBuilding'
import baseEnFloor from '@/components/building/baseEnFloor'
import baseEnDepartment from '@/components/building/baseEnDepartment'
import baseCfgPort from '@/components/device/baseCfgPort'
import baseStdSampler from '@/components/device/baseStdSampler'
import baseStdDevType from '@/components/device/baseStdDevType'
import baseEnMeter from '@/components/device/baseEnMeter'
import baseCfgDevice from '@/components/device/baseCfgDevice'
import baseEnElecClass from '@/components/device/baseEnElecClass'
import baseEnTransformer from '@/components/device/baseEnTransformer'


Vue.use(Router)

const router = new Router({
  routes: [{
    path: '/',
    redirect: '/login'
  },{
    path: '/login',
    component: login
  },{
    path: '/home',
    component: home
  },{
    path: '/main',
    component: main,
    children: [
      {
        path: '',
        redirect: 'station-workStation'
      },{
        path: 'station-workStation',
        component: workStation
      },{
        path: 'station-baseHouse',
        component: baseHouse
      },{
        path: 'device-baseEnBuilding',
        component: baseEnBuilding
      },{
        path: 'station-baseEnSwitchRoom',
        component: baseEnSwitchRoom
      },{
        path: 'station-baseEnDistBox',
        component: baseEnDistBox
      },{
        path: 'building-baseEnBuilding',
        component: baseEnBuilding
      },{
        path: 'building-baseEnFloor',
        component: baseEnFloor
      },{
        path: 'building-baseEnDepartment',
        component: baseEnDepartment
      },{
        path: 'device-baseCfgPort',
        component: baseCfgPort
      },{
        path: 'device-baseStdSampler',
        component: baseStdSampler
      },{
        path: 'device-baseStdDevType',
        component: baseStdDevType
      },{
        path: 'device-baseEnMeter',
        component: baseEnMeter
      },{
        path: 'device-baseCfgDevice',
        component: baseCfgDevice
      },{
        path: 'device-baseEnElecClass',
        component: baseEnElecClass
      },{
        path: 'device-baseEnTransformer',
        component: baseEnTransformer
      }
    ]
  }]
})

export default router
